lib: Use `Locking:` term in docs
authorColin Walters <walters@verbum.org>
Wed, 2 May 2018 16:17:20 +0000 (12:17 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 2 May 2018 17:28:29 +0000 (17:28 +0000)
This is easier to `git grep` etc. versus ad-hoc English.  Although
we still have some English for the prepare_transaction/commit which
acquire/release in separate phases.

Closes: #1572
Approved by: jlebon

src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-prune.c

index 6eb645bedb5fdfa80a363408a636472cfe0c31d8..2ddcf498c3fec47ca5dcc39e116fde37c932ebcf 100644 (file)
@@ -1551,10 +1551,9 @@ ostree_repo_scan_hardlinks (OstreeRepo    *self,
  * on a single `OstreeRepo` instance as long as their lifetime is bounded by the
  * transaction.
  *
+ * Locking: Acquires a `shared` lock; release via commit or abort
  * Multithreading: This function is *not* MT safe; only one transaction can be
  * active at a time.
- *
- * This function takes a shared lock on the @self repository.
  */
 gboolean
 ostree_repo_prepare_transaction (OstreeRepo     *self,
@@ -2080,6 +2079,7 @@ ostree_repo_set_collection_ref_immediate (OstreeRepo                 *self,
  * Note that if multiple threads are performing writes, all such threads must
  * have terminated before this function is invoked.
  *
+ * Locking: Releases `shared` lock acquired by `ostree_repo_prepare_transaction()`
  * Multithreading: This function is *not* MT safe; only one transaction can be
  * active at a time.
  */
index 2ffd69488937f01d8cdfc0733df259e8f3483807..4c883542234c9ddefcefef9f5aa20261f4209160 100644 (file)
@@ -193,7 +193,7 @@ _ostree_repo_prune_tmp (OstreeRepo *self,
  * targeting that commit; otherwise any static delta of non existing commits are
  * deleted.
  *
- * This function takes an exclusive lock on the @self repository.
+ * Locking: exclusive
  */
 gboolean
 ostree_repo_prune_static_deltas (OstreeRepo *self, const char *commit,
@@ -326,7 +326,7 @@ repo_prune_internal (OstreeRepo        *self,
  * statistics on objects that would be deleted, without actually
  * deleting them.
  *
- * This function takes an exclusive lock on the @self repository.
+ * Locking: exclusive
  */
 gboolean
 ostree_repo_prune (OstreeRepo        *self,
@@ -438,7 +438,7 @@ ostree_repo_prune (OstreeRepo        *self,
  * The %OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE flag may be specified to just determine
  * statistics on objects that would be deleted, without actually deleting them.
  *
- * This function takes an exclusive lock on the @self repository.
+ * Locking: exclusive
  */
 gboolean
 ostree_repo_prune_from_reachable (OstreeRepo        *self,